<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>求闰年</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script type="text/javascript">
    // year能被4整除 and 不能被100整除) or year能被400整除 
    for(var year=2000; year<=3000; year++) {
        if(year%4 == 0 && year%100 != 0 || year%400 == 0) {
            document.write(year + '是闰年<br />');
        }
    }
</script>

<style type="text/css">
</style>
</head>
    <body>
    </body>
</html>